1. Field of the Invention
The present invention relates to an inventory retrieving process in a sales circulation business.
2. Description of the Related Art
An inventory managing technology using a database system is becoming common in sales circulation businesses.
In a table of an inventory management database, each commodity item is registered as one record entry. Each record is composed of a plurality of fields of attributes such as color and size.
When an inventory retrieving process is performed for extracting a desired commodity item that satisfies a particular condition from the database table, inquiry conditions are designated for individual attributes (fields) of the table.
In such a conventional inventory retrieving process, designated attributes affect the result of the inventory retrieving process. In other words, attributes that have not been designated do not affect the result.
Thus, all conditions for an inventory retrieving process should be defined as conditions of particular attributes. Consequently, some experience is required to designate such conditions. In other words, the inventory retrieving process cannot be always flexibly performed.
In reality, to perform an inventory retrieving process in such a manner that commodity items of M size are retrieved with higher priority than commodity items of L size, a condition xe2x80x9cM sizexe2x80x9d is designated to a xe2x80x9csizexe2x80x9d attribute. Thereafter, a condition xe2x80x9cL sizexe2x80x9d is designated to the xe2x80x9csizexe2x80x9d attribute. In this case, two steps of the inventory retrieving process are required. Thus, conventionally, it is difficult to designate to the database an automatic inventory retrieving rule such as xe2x80x9cunless a size is designated, commodity items of M size are allocated with higher priority than commodity items of L sizexe2x80x9d.
The present invention is made from the above described point of view. An object of the present invention is to accomplish an automatic inventory retrieving process corresponding to a predetermined rule even if a designated condition of the inventory retrieving process is not part of the query.
The present invention is based on an inventory managing apparatus for performing an inventory management for a management object.
The inventory managing apparatus has a database table (inventory information tree DB) composed of records to which nodes that form a binary tree are assigned, each of the nodes being defined with at least the type of an attribute of the management object, the value thereof, an inventory quantity of the management object that satisfies a classification condition represented by the position of the node on the binary tree data, and the relation of a link to another node.
In addition, the inventory managing apparatus has an inventory retrieving unit (104) for searching each node on the binary tree data through the database table corresponding to a retrieving condition defined with a combination of the attribute and value of the management object, executing an inventory retrieving process for updating the inventory quantity of each node, and searching each node with a priority corresponding to the horizontal position of each node in hierarchical levels with attributes that are not included in the retrieving condition (the query).
In the structure of the present invention, even if a condition of the inventory retrieving process is not part of the query, the inventory retrieving process can be automatically performed corresponding to an inventory retrieving rule based on the searching priority in a binary tree data structure.
The apparatus may have an inventory stocking unit (105) for executing an inventory stocking process for updating the inventory quantity of each node while searching each node on the binary tree data through the data base corresponding to a stocking condition defined with a combination of the attribute and value of the management object.
The apparatus may have a binary tree data structure creating unit for developing the binary tree data from the database table to a memory unit, wherein the inventory retrieving unit or the inventory stocking unit executes the inventory retrieving process or the inventory stocking process for the binary tree data developed in the memory unit.
Due to the configuration of the present invention, the desired binary tree data can be located quickly.
Each record may have an identification information field for storing identification information having a value corresponding to the position of the node on the binary tree data. The binary tree data structure creating unit develops the binary tree data from the database table to the memory unit corresponding to the content of the identification information field.
In an embodiment of the present invention, with a simple query to a database table, binary tree data can be developed from the database table to the memory unit.
Each record may have a management object type field for storing the type of the management object. The binary tree data structure creating unit develops the binary tree data for each management object type from the database table to the memory unit corresponding to the content of the management object type field.
In the structure of the present invention, with a simple query to the database table, binary tree data can be developed from the database table to the memory unit.
Each node that forms the binary tree data stored in the memory unit may have node update information that represents whether or not the inventory quantity corresponding to each node has been updated by the inventory retrieving unit or the inventory stocking unit. The apparatus may have a database updating unit for affecting the update state of the binary tree data developed in the memory unit to the database table corresponding to the node update information.
In an embodiment of the present invention, binary tree data in the memory unit can be effectively matched with the database table.
In addition, the present invention can be effectuated by a storage medium from which a computer reads a program that causes the computer to perform the function accomplished by the structure of the first aspect of the present invention.